<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;overflow-x: auto">
<!-- 标题 -->
<div class="page-heade clearfix">
    <h1 class="clearfix">
        <a class="col-md-6 title_color H_right" href="{:url('ddgl/xsddgl')}" id="Ap1" style="color:#333;font-size: 16px;">销售订单查询</a>
        <a class="col-md-6  H_active title_color" id="Ap2" style=" font-size: 16px;" href="{:url('ddgl/xsddmxcx')}">销售订单明细查询</a>
    </h1>
</div>
<!-- 标题 -->
<div>
    <form action="" class="form-inline">
        <table class="row-margin-top tab-content table-bordered table text-left" border="1">
            <tr>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">分区：</label></td>
                <td><input type="text" class="form-control" name="zoning" value="{$zoning}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">省份：</label></td>
                <td><input type="text" class="form-control" name="provice" value="{$provice}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">城市：</label>
                </td>
                <td><input type="text" class="form-control" name="city" value="{$city}"></td>
            </tr>
            <tr>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">对应销售订单号：</label></td>
                <td><input type="text" class="form-control" name="order_sn" value="{$order_sn}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">经销商编号：</label></td>
                <td><input type="text" class="form-control" name="khbh" value="{$khbh}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">经销商名称：</label>
                </td>
                <td><input type="text" class="form-control" name="khmc" value="{$khmc}"></td>
            </tr>
            <tr>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">申请状态：</label></td>
                <td>
                    <select name="sqzt" id="" class="form-control">
                        <option value="">请选择</option>
                        {volist name="sqzts" id="row"}
                        <option value="{$row.id}" {if $sqzt==$row.id}selected{/if}>{$row.title}</option>
                        {/volist}
                    </select>
                </td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">物料类型：</label></td>
                <td>
                    <select name="kind" id="" class="form-control">
                        <option value="">全部</option>
                        <option value="1" {if $kind==1}selected{/if}>销售物料</option>
                        <option value="2" {if $kind==2}selected{/if}>成品</option>
                    </select>
                </td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">销售类型：</label>
                </td>
                <td>
                    <select name="xslx" id="" class="form-control">
                        <option value="">全部</option>
                        <option value="1" {if $xslx==1}selected{/if}>销售</option>
                        <option value="2" {if $xslx==2}selected{/if}>搭赠</option>
                        <option value="3" {if $xslx==3}selected{/if}>货补</option>
                        <option value="4" {if $xslx==4}selected{/if}>补费</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label"> SKU：</label></td>
                <td><input type="text" class="form-control" name="sku" value="{$sku}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label"> 物料编码：</label></td>
                <td><input type="text" class="form-control" name="prod_sn" value="{$prod_sn}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label"> 物料名称：</label>
                </td>
                <td><input type="text" class="form-control" name="prod_name" value="{$prod_name}"></td>
            </tr>
            <tr>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label"> 品类：</label>
                </td>
                <td><input type="text" class="form-control" name="category" value="{$category}"></td>
                <td style="min-width: 160px" class="text-right"><label for="" class="form-label">时间段：</label>
                </td>
                <td>
                    <div class="form-group">
                        <input type="text" id="start" name="start" value="{$start}" class="form-control layer-date "
                               style="min-width: 100px;width: 100px; height: 26px;display: inline-block;">
                    </div>
                    <div class="form-group">
                        至
                    </div>
                    <div class="form-group">
                        <input type="text" name="end" value="{$end}" class="form-control layer-date"
                               style="min-width: 100px;width: 100px; height: 26px;display: inline-block;" id="end">
                    </div>
                </td>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn btn-info query" type="submit">查询</button>
                    <button class="btn btn-info emptyIf" type="button">清空</button>
                    <button class="btn btn-info LendExcel" type="button">导出Excel</button>
                </td>
            </tr>
        </table>
        <p>订货数量合计：{$num}；搭赠数量合计：{$dzsl}；应收金额合计(元)：{$ysje}</p>
        <table class="table row-margin-top table-bordered text-center bud_hei">
            <tr class="info text-center">
                <th style="min-width: 100px;width: 100px" class="text-center">NO.</th>
                <th style="min-width: 100px;width: 100px" class="text-center">分区</th>
                <th style="min-width: 100px;width: 100px" class="text-center">省份</th>
                <th style="min-width: 100px;width: 100px" class="text-center">城市</th>
                <th style="min-width: 140px;width: 140px" class="text-center">对应销售订单编号</th>
                <th style="min-width: 200px;width: 200px" class="text-center">经销商编号</th>
                <th style="min-width: 300px;width: 300px" class="text-center">经销商名称</th>
                <th style="min-width: 100px;width: 100px" class="text-center">申请状态</th>
                <th style="min-width: 100px;width: 100px" class="text-center">品类</th>
                <th style="min-width: 100px;width: 100px" class="text-center">SKU</th>
                <th style="min-width: 100px;width: 100px" class="text-center">物料编码</th>
                <th style="min-width: 100px;width: 100px" class="text-center">物料名称</th>
                <th style="min-width: 100px;width: 100px" class="text-center">规格</th>
                <th style="min-width: 100px;width: 100px" class="text-center">物料类型</th>
                <th style="min-width: 100px;width: 100px" class="text-center">销售类型</th>
                <th style="min-width: 100px;width: 100px" class="text-center">单位</th>
                <th style="min-width: 100px;width: 100px" class="text-center">供货单价(元)</th>
                <th style="min-width: 100px;width: 100px" class="text-center">订货数量</th>
                <th style="min-width: 100px;width: 100px" class="text-center">搭赠数量</th>
                <th style="min-width: 100px;width: 100px" class="text-center">货补数量</th>
                <th style="min-width: 100px;width: 100px" class="text-center">发货数量</th>
                <th style="min-width: 100px;width: 100px" class="text-center">收货数量</th>
                <th style="min-width: 100px;width: 100px" class="text-center">原金额(元)</th>
                <th style="min-width: 100px;width: 100px" class="text-center">应收金额(元)</th>
                <th style="min-width: 100px;width: 100px" class="text-center">体积(立方米)</th>
                <th style="min-width: 100px;width: 100px" class="text-center">重量(吨)</th>
            </tr>
            {volist name="data" id="row" key="k"}
            <tr>
                <td>{$k+((request()->param('page')?request()->param('page'):1)-1)*10}</td>
                <td>{$row.zoning}</td>
                <td>{$row.provice}</td>
                <td>{$row.city}</td>
                <td><a href="{:url('wdxsdd/view',['id'=>$row.id])}" class="J_menuItem">{$row.sn}</a></td>
                <td>{$row.khbh}</td>
                <td class="font-bold">{$row.khmc}<span class="glyphicon glyphicon-ok duigou" title="已生效"
                                                        aria-hidden="true"></span></td>
                <td>{$row.sqzt}</td>
                <td>{$row.category}</td>
                <td>{$row.sku}</td>
                <td>{$row.prod_sn}</td>
                <td>{$row.prod_name}</td>
                <td>{$row.guige}</td>
                <td>{$row.kind}</td>
                <td>{$row.xslx}</td>
                <td>{$row.unit}</td>
                <td>{$row.xgj}</td>
                <td>{$row.num}</td>
                <td>{$row.dzsl}</td>
                <td>{$row.hbsl}</td>
                <td>{$row.fhsl}</td>
                <td>{$row.shsl}</td>
                <td>{$row.yje}</td>
                <td>{$row.ysje}</td>
                <td>{$row.tj}</td>
                <td>{$row.zl}</td>
            </tr>
            {/volist}
        </table>
    </form>
</div>
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    $('.emptyIf').on('click',function () {
        var form = $(this).closest('form')
        form.find('input[type=text]').val('')
        form.find('select').val('')
        form.submit()
    })
</script>
</body>

</html>
